ABC107 B - Grid Compression
提出
code: python
h, w = map(int, input().split())
i_white = []
j_white = []
for i in range(h):
j_white.append(i)
for i in range(w):
flag = True
for j in range(h):
flag = False
continue
if (flag):
i_white.append(i)
ans = []
for i in range(h):
if (i in j_white):
continue
tmp_ans = []
for j in range(w):
if (j in i_white):
continue
ans.append(tmp_ans)
for i in ans:
print("".join(i))
テーマ